/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.teaching.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 课程管理Entity
 * @author 王卫党
 * @version 2018-01-23
 */
public class Course extends DataEntity<Course> {
	
	private static final long serialVersionUID = 1L;
	private String industry;		// 所属行业
	private String name;		// 课程名
	private String intro;		// 课程简介
	private Long price;		// 价格，以分为单位
	private Date openTime;		// 上架时间
	private String picPath;		// 图片路径
	private String img;		// img
	private Integer hot;		// hot
	private Integer enabled;		// enabled
	
	public Course() {
		super();
	}

	public Course(String id){
		super(id);
	}

	@Length(min=1, max=20, message="所属行业长度必须介于 1 和 20 之间")
	public String getIndustry() {
		return industry;
	}

	public void setIndustry(String industry) {
		this.industry = industry;
	}
	
	@Length(min=1, max=20, message="课程名长度必须介于 1 和 20 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=200, message="课程简介长度必须介于 1 和 200 之间")
	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}
	
	@NotNull(message="价格，以分为单位不能为空")
	public Long getPrice() {
		return price;
	}

	public void setPrice(Long price) {
		this.price = price;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="上架时间不能为空")
	public Date getOpenTime() {
		return openTime;
	}

	public void setOpenTime(Date openTime) {
		this.openTime = openTime;
	}
	
	@Length(min=0, max=100, message="图片路径长度必须介于 0 和 100 之间")
	public String getPicPath() {
		return picPath;
	}

	public void setPicPath(String picPath) {
		this.picPath = picPath;
	}
	
	@Length(min=0, max=200, message="img长度必须介于 0 和 200 之间")
	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}
	
	public Integer getHot() {
		return hot;
	}

	public void setHot(Integer hot) {
		this.hot = hot;
	}
	
	public Integer getEnabled() {
		return enabled;
	}

	public void setEnabled(Integer enabled) {
		this.enabled = enabled;
	}
	
}